package entities;

import index.StartGame;

import java.awt.image.BufferedImage;

/*
    父类包含成员变量：血量，x，y，图片，图片宽，图片高
 */

public class HeroPlane extends FlyingObject{
    //英雄机总分
    private int Score = 0;
    private BufferedImage[] states = {StartGame.hero0,StartGame.hero1};
    private int count = 0;
    //子弹种类
    private int bulletType = 0;
    @Override
    public void move() {
        //随鼠标移动
        //图片切换
        count++;
        setAppearance(states[count % 2]);

    }
    public HeroPlane() {
        super(StartGame.HERO_HP,  //英雄血量
                StartGame.HERO_INITIAL_POSITION[0],  //英雄初始位置
                StartGame.HERO_INITIAL_POSITION[1],
                StartGame.hero0, //英雄初始图片
                0);  //英雄初始分数
        setP_height(getAppearance().getWidth());
        setP_height(getAppearance().getHeight());
    }

    @Override
    public int getScore() {
        return Score;
    }

    @Override
    public void setScore(int score) {
        Score = score;
    }

    public int getBulletType() {
        return bulletType;
    }

    public void setBulletType(int bulletType) {
        this.bulletType = bulletType;
    }
}
